<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>POS收单运营管理平台</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link href="<s:url value="/css/a.css"/>" type="text/css"
			rel="stylesheet" />
		<link href="<s:url value="/css/index.css"/>" type="text/css"
			rel="stylesheet" />

		<script type="text/javascript"
			src="<c:url value="/js/jquery-1.3.2.js" />"></script>
		<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
		<script language="javascript" type="text/javascript"
			src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
		<script type="text/javascript" src="/js/jquery-1.9.1.js"></script>
		<script type="text/javascript" src="/js/tabcontrol/TabPanel.js"></script>

		<style>
　　　
　　　　　a {
	text-decoration: none
}

　　　　　a:hover {
	color: red;
	text-decoration: none
}

a:VISITED {
	color: red;
}
　　






　　　
</style>

<script type="text/javascript">

	$(document).ready(
			function() {
				$("#sub").click(function(){ 

    		    $("#queryUserForm").attr("action","<%=basePath%>/diaodan/diaodanhandleupdate.ct");
    			$("#queryUserForm").submit();
    		 
            });
			});


</script>



	</head>

	<body>

		<div class="subpage">
			<s:form id="queryUserForm" action="/diaodan/diaodanhandleupdate.ct"
				method="post" theme="simple">
				<div class="user_title">
					<h2 class="headline-inquires">
						POS收单运营管理平台
						<br />
						<span class="sub-title"></span>
					</h2>
				</div>
				
				<table width="100%" cellpadding="0" cellspacing="0" border="0" class="query_table">
					<tr>
						<td colspan="4" align="center">
							<h2 class="headline-inquires">
								结算信息列表
							</h2>
						</td>
					</tr>
				</table>
				<table id="tableList" width="100%" class="table">
					<thead>
						<tr>
							<th>
								商户号
							</th>
							<th>
								商户名称
							</th>
							<th>
								结算日期
							</th>
							<th>
								出款日期
							</th>
							<th>
								总金额（元）
							</th>
							<th>
								总笔数
							</th>
							<th>
								商户手续费（元）
							</th>
							<th>
								结算金额（元）
							</th>
							<th>
								结算状态
							</th>
							<th>
								冻结状态
							</th>
							<th>
								结算银行
							</th>
							<th>
								账号名称
							</th>
							<th>
								银行账号
							</th>
							<th>
								结算批次
							</th>
							
						</tr>
					</thead>
					<tbody>
						<s:iterator value="#request.settlist" status="stat" id="sett">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>">
								
								<td>
									 
										<s:property value="#sett.merchantno" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.merchantname" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.settledate" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.setdate" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.totalamt" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.totalnum" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.merchantfee" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.merchantsettleamt" />
									 
								</td>
								<td>
									 
										<s:if test="#sett.settleflag==\"Y\"">
					                          待审核
					        </s:if>
										<s:elseif test="#sett.settleflag==\"W\"">
					                             待出款
					        </s:elseif>
					        <s:elseif test="#sett.settleflag==\"H\"">
					                          调单处理成功
					        </s:elseif>
										<s:elseif test="#sett.settleflag==\"D\"">
					                            出款中
					        </s:elseif>
										<s:elseif test="#sett.settleflag==\"S\"">
					                           出款成功
					        </s:elseif>
										<s:else>
					                           出款失败
					        </s:else>

									 
								</td>
								<td>
									 
										<s:if test="#sett.freezeflag==\"Y\"">
					                       已冻结
					        			</s:if>
										 <s:elseif test="#sett.freezeflag==\"Q\"">
					                       冻结申请
					        			</s:elseif>
										<s:else>
					                          未冻结
					        			</s:else>

									 
								</td>
								<td>
									 
										<s:property value="#sett.bankdeposit" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.accountname" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.accountno" />
									 
								</td>
								<td>
									 
										<s:property value="#sett.batchno" />
									 
								</td>
							</tr>
						</s:iterator>
					</tbody>
				</table>
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td colspan="4" align="center">
							<h2 class="headline-inquires">调单信息列表</h2>
						</td>
					</tr>
				</table>
				<table id="tableList" width="100%" class="table">
				<thead>
					<tr>  	
					    <th>所属机构</th>
						<th>所属代理商</th>
						<th>商户号</th>
						<th>商户名</th>
						<th>交易日期</th>
						<th>交易时间</th>
						<th>终端号</th>
						<th>流水号</th>
						<th>系统参考号</th>
						<th>交易金额（元）</th>
						<th>冻结状态</th>
						<th>调单处理状态</th>
						<th>冻结金额（元）</th>
						<th>已冻结金额（元）</th>
						<th>未冻结金额（元）</th>
						<th>申请时间</th>
					</tr>
				</thead>
				<tbody>
				<s:hidden name="idd" value="%{#request.diaoDan.id}"/>
					
							<tr class="tr_0" >
							<td> <s:property value="#request.diaoDan.orgcode"/> </td>
							<td> <s:property value="#request.diaoDan.agentid"/> </td>
							<td> <s:property value="#request.diaoDan.merchantno"/> </td>
							<td> <s:property value="#request.diaoDan.merchantname"/> </td>
							<td> <s:property value="#request.diaoDan.transdate"/> </td>
							<td> <s:property value="#request.diaoDan.transtime"/> </td>
							<td> <s:property value="#request.diaoDan.termid"/> </td>
							<td> <s:property value="#request.diaoDan.termtrace"/> </td>
							<td> <s:property value="#request.diaoDan.etstrace"/> </td>
							<td> <page:amount amount="${request.diaoDan.transamt/100}"/> 
							</td>
							<td> 
							<s:if test="#request.diaoDan.status==\"1\"">
					                          已冻满
					        </s:if>
					        <s:if test="#request.diaoDan.status==\"0\"">
					                          未冻满
					        </s:if>
							 </td>
								<td> 
							<s:if test="#request.diaoDan.reversal==\"1\"">
					                          已处理
					        </s:if>
					        <s:if test="#request.diaoDan.reversal==\"0\"">
					                          待处理
					        </s:if>
							 </td>
							<td> 
							<page:amount amount="${request.diaoDan.DDamount/100}"/>
							 </td>
							<td> 
							<page:amount amount="${request.diaoDan.frozenAmount/100}"/>
							 </td>
							<td> 
							<page:amount amount="${request.diaoDan.unFrozenAmount/100}"/>
							 </td>
							<td> <s:property value="#request.diaoDan.startdate"/> </td>
						    </tr>
						
				</tbody>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" border="0" class="query_table">
					<tr>
						<td colspan="4" align="center">
						<s:if test="#request.diaoDan.reversal==\"0\"">
					              <input id="sub" value="调单处理" type="button" />
					        </s:if>
							<s:if test="#request.diaoDan.reversal==\"1\"">
					              <input id="sub" value="调单处理" type="button" disabled/>
					        </s:if>
							&nbsp;&nbsp;&nbsp;&nbsp;
						</td>
					</tr>
				</table>
			</s:form>
		</div>
		<s:if test="#request.msg !=null">
			<script language="javascript">
			alert("${request.msg}");
		</script>
		</s:if>
	</body>
</html>
